package site.helper;

public final class ResourceType {
	/**
	 * 教学要点
	 */
	public final static String POINT = "POINT";
	/**
	 * 教学方案
	 */
	public final static String PLAN = "PLAN";
	/**
	 * 热点难点解读
	 */
	public final static String TOPIC = "TOPIC";
	/**
	 * 教学资源
	 */
	public final static String STUFF = "STUFF";
	/**
	 * 教学方法
	 */
	public final static String MEANS = "MEANS";
	/**
	 * 实践教学
	 */
	public final static String LIVE = "LIVE";
	/**
	 * 教学案例
	 */
	public final static String CASE = "CASE";

	/**
	 * 出错编号为XX
	 * @method ToCode
	 * @info author:陈亚鹏  date:2012-10-9 下午08:31:13 version:1.0
	 * @param code
	 * @return String
	 */
	public static String ToCode(String code) {
		if (code.toUpperCase().equals(POINT)) {
			return "YD";
		} else if (code.toUpperCase().equals(PLAN)) {
			return "FA";
		} else if (code.toUpperCase().equals(TOPIC)) {
			return "RN";
		} else if (code.toUpperCase().equals(STUFF)) {
			return "ZY";
		} else if (code.toUpperCase().equals(MEANS)) {
			return "FF";
		} else if (code.toUpperCase().equals(LIVE)) {
			return "SJ";
		} else if (code.toUpperCase().equals(CASE)) {
			return "AL";
		}

		return "XX";
	}
}
